Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dataset + handle multiple cities and cantons per zipcode #47

Merged
merged 7 commits into from
May 26, 2024

Conversation

kira0269
Copy link
Contributor

This is a PR to solve both issues #46 and #33.

I don't know if you want to keep a "no breaking change promise".
I changed some methods signatures in CantonManager for example.

Tell me if you want me to keep "old" methods and put them in deprecated.

@kira0269 kira0269 force-pushed the feature/update-dataset branch from de3a43f to 998b5f9 Compare May 24, 2024 11:33
@stefanzweifel
Copy link
Owner

Thanks for this PR @kira0269! 👏

I'm open to make breaking changes. That's what major versions are here for.
I actually tought about working on these problems myself the last few days; just didn't have the time yet.

As far as I can see, the breaking changes are:

  • signature changes in CantonManager
  • removal of ZipcodeSearch

That's just something we will have to mention in the release notes and CHANGELOG.


On first look, the PR looks good. The only thing missing are documentation/examples in the README. Do you want to add them? Or should I contribute them?

Will take a closer look at this this weekend.

@stefanzweifel stefanzweifel self-requested a review May 24, 2024 14:48
@kira0269
Copy link
Contributor Author

Hi @stefanzweifel

I'll add examples on monday. :)
But feel free to contribute if you want this weekend

Copy link
Owner

@stefanzweifel stefanzweifel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for your PR. I've …

  • renamed the method to getByZipcodeAndCity() to be more similar to the rest of the API
  • updated the CSV import command to use "Ortschaftsname" instead of "Gemeindename". Several cities/villages I know were no longer in the dataset as their name was swallowed by using the "Gemeindename". (For example "Glattpark" and "Glattbrugg" both are valid cities but belong to the same municipality called "Opfikon".)

Going to merge this and release a new major version.

@stefanzweifel stefanzweifel merged commit 9ea3da5 into stefanzweifel:main May 26, 2024
1 check failed
@stefanzweifel
Copy link
Owner

I was a bit hot-headed and 7124f06 broke the test suite. Will ship a fix soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants